package com.rambo.hcq.api.po;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author Rambo 2018-09-13
 **/
@Entity(name = "sys_user")
public class SysUserPO {
    private String uuid;
    private String name;
    private String passwd;
    private String sex;
    private String phone;
    private String photo;
    private String email;
    private String createBy;
    private Timestamp createDate;
    private String updateBy;
    private Timestamp updateDate;
    private String effective;
    private Integer sorts;

    @Id
    @Column(name = "uuid")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "passwd")
    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "photo")
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "create_by")
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "update_by")
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    @Basic
    @Column(name = "update_date")
    public Timestamp getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Timestamp updateDate) {
        this.updateDate = updateDate;
    }

    @Basic
    @Column(name = "effective")
    public String getEffective() {
        return effective;
    }

    public void setEffective(String effective) {
        this.effective = effective;
    }

    @Basic
    @Column(name = "sorts")
    public Integer getSorts() {
        return sorts;
    }

    public void setSorts(Integer sorts) {
        this.sorts = sorts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        SysUserPO sysUserPO = (SysUserPO) o;
        return Objects.equals(uuid, sysUserPO.uuid) && Objects.equals(name, sysUserPO.name) && Objects.equals(passwd, sysUserPO.passwd) && Objects.equals(sex, sysUserPO.sex) && Objects.equals(phone, sysUserPO.phone) && Objects.equals(photo, sysUserPO.photo) && Objects.equals(email, sysUserPO.email) && Objects.equals(createBy, sysUserPO.createBy) && Objects.equals(createDate, sysUserPO.createDate) && Objects.equals(updateBy, sysUserPO.updateBy) && Objects.equals(updateDate, sysUserPO.updateDate) && Objects.equals(effective, sysUserPO.effective) && Objects.equals(sorts, sysUserPO.sorts);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uuid, name, passwd, sex, phone, photo, email, createBy, createDate, updateBy, updateDate, effective, sorts);
    }
}